local BaseState = require("states.gen.base_state")

return Class{
	__includes = BaseState,
	init = function (self)
	   BaseState.init(self)
	   self.fullscreen = Game.config.fullscreen
	end,

	load = function (self)
		local x, y, w, h = self.gui:center(400, 70)
		local ul = self.gui:ul(x, y, w, h, "Fullscreen", "Back")
		ul.onclick = function (index, b)
		   @@SWITCH(index,
			    1:
			    self.fullscreen = not self.fullscreen
			    $LW.setFullscreen(self.fullscreen),
			    
			    2:
			    Game:switch_state("mainmenu"))
		   
		end
		self.ul = ul
	end,
}
